<?php
class BaseSQLDAO {

    private $conn;

    public function getConnection() {
        $this->conn = mysqli_connect("localhost", "root", "root", "funmobile");
        if (empty($this->conn)){
            die("Database connection failed: " . mysqli_connect_error());
            return;
        }
        return $this->conn;
    }

    public function closeConnection() {
        if (!empty($this->conn)){
            $this->conn->close();
        }
    }


}
?>
